﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;
using l1cs.server.model;
using l1cs.server.serverpackets;

namespace l1cs.server.clientpackets
{
    public class C_PetMenu : ClientBasePacket
    {
        private const String _C_PET_MENU = "[C] C_PetMenu";
        private static Logger _log = Logger.getLogger( typeof( C_PetMenu ).FullName );

        public C_PetMenu( byte[] abyte0, ClientThread clientthread )
            : base( abyte0 )
        {

            int petId = readD();

            L1PetInstance pet = (L1PetInstance)L1World.getInstance().findObject( petId );
            L1PcInstance pc = clientthread.getActiveChar();

            if ( pet != null && pc != null )
            {
                pc.sendPackets( new S_PetInventory( pet ) );
            }
        }

        override
        public String getType()
        {
            return _C_PET_MENU;
        }
    }
}